/**
 * @Aurhor 把手给我
 * @Date 2022/6/13 16:08
 * @Version 1.0
 **/
package com.ft.service.impl;

import com.ft.dao.IndexSmartWearDao;
import com.ft.domain.IndexSmartWear;
import com.ft.service.IndexSmartWearService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndexSmartWearServiceImpl implements IndexSmartWearService {

    @Autowired
    IndexSmartWearDao indexSmartWearDao;

    /**
     * 查询主页智能穿戴组件所有数据
     * @return 返回IndexSmartWear实体类集合
     */
    @Override
    public List<IndexSmartWear> selectAll() {
        List<IndexSmartWear> indexSmartWears = indexSmartWearDao.selectAll();
        return indexSmartWears;
    }
    /**
     * 主页智能穿戴组件添加数据
     * @param  indexSmartWear 传入的IndexSmartWear对象
     * @return 0成功，1失败
     */
    @Override
    public int addIndexSmartWear(IndexSmartWear indexSmartWear) {
        int i = indexSmartWearDao.addIndexSmartWear(indexSmartWear);
        return i;
    }
    /**
     * 主页智能穿戴组件删除功能
     * @param id 更加id删除
     * @return 0成功,1失败
     */
    @Override
    public int deleteIndexSmartWear(int id) {
        int i = indexSmartWearDao.deleteIndexSmartWear(id);
        return i;
    }
}
